package com.example.myapplication1.threademo.cutdownlatchtest.service;

import android.util.Log;

import com.example.myapplication1.threademo.cutdownlatchtest.AbstractService;

import java.util.concurrent.CountDownLatch;

/**
 * Copyright (C), 2020, 重庆八进制有限公司
 *
 * @author: weng
 * @last-modifier: weng
 * @version: 1.0
 * @create-date: 2020/12/3 11:51
 * @last-modify-date: 2020/12/3 11:51
 * @description:
 */
public class ServiceB extends AbstractService {

    public ServiceB(CountDownLatch countDownLatch) {
        super(countDownLatch);
    }


    @Override
    public boolean dotask() {

                try {
                    Thread.sleep(400);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Log.e("tag", "serviceB执行完毕");
                return true;
            }
}
